package com.ryskoo.common.hclconstant;

/**
 * 行业类型枚举
 *
 * @author thq
 */
public enum IndustryEnum {
    FOODS("foods", "餐饮"),
    FLOWER("flower", "鲜花"),
    CAKE("cake", "蛋糕");
    private String value;
    private String name;

    IndustryEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(String value) {
        for (IndustryEnum o : IndustryEnum.values()) {
            if (o.getValue().equals(value)) {
                return o.getName();
            }
        }
        return "";
    }
}
